<?php
class DB {
    public static $mysqli;
    public static $_stmt = NULL;
    public static function Connection() {        
        self::$mysqli = new mysqli(DB_SERVIDOR, DB_USUARIO, DB_SENHA, DB_NOME);
        if (self::$mysqli->connect_errno || self::$mysqli->errno) {
            die(self::$mysqli->error);           
        }else{
            self::$mysqli->set_charset('utf8');
        }
        
        return self::$mysqli;
    }

}

?>
